﻿using Newtonsoft.Json;
using Swashbuckle.AspNetCore.Annotations;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Alison.EFCore.Dto
{ 
     /// <summary>
     /// 组
     /// </summary>
    [SwaggerSchema(Title = "组GroupDto", Description = "组Class")]
    public class GroupDto: BaseDto
    { 
        /// <summary>
        /// 组代码
        /// </summary>
        [JsonProperty("groupCode")]
        [Description("组代码")]
        [SwaggerSchema(Title = "组", Description = "组代码")]
        [StringLength(20, ErrorMessage = "The {0} must be at least {2} and at max {1} characters long.", MinimumLength = 2)]
        public string GroupCode { get; set; }

        /// <summary>
        /// 组名称
        /// </summary>
        [JsonProperty("groupName")]
        [Description("组名称")]
        [SwaggerSchema(Title = "组", Description = "组名称")]
        [StringLength(20, ErrorMessage = "The {0} must be at least {2} and at max {1} characters long.", MinimumLength = 2)]
        public string GroupName { get; set; }
    }
}
